<?php global $cfg;?><!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=7" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo _T("网站标题");?></title>
<link href="<?php echo $this->baseUrl;?>/style/global<?php if ($cfg['lang'] == 'en')echo '_en';?>.css" rel="stylesheet" type="text/css" />
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/jquery.pack.js" /></script>
<script language="javascript" type="text/javascript" src="<?php echo $this->baseUrl;?>/js/common.js" /></script>

</head>
<body>
<div class="wrapper">
	<h1><?php echo _T("网站子标题");?></h1>
    <h2><?php echo ($cfg['lang'] == 'cn')?$this->meetinfo['name'] : $this->meetinfo['enname'];?></h2>
	<div class="frame">
		<h2 class="h21">会议简介</h2>
	<div class="intro">
		<p><?php echo ($cfg['lang'] == 'cn')?$this->meetinfo['content'] : $this->meetinfo['encontent'];?></p>
    </div>
	<div class="reg">
	  <h2 class="h22"><?php echo _T("网站标题");?></h2>
<input type="hidden" name="mid" value="<?php echo $this->meetinfo['mid'];?>" />
<input type="hidden" name="code" value="<?php echo $this->code;?>" />
<input type="hidden" name="mail" value="<?php echo $this->mail;?>" />
<input type="hidden" name="lang" value="<?php echo $this->lang;?>" />
<table class="t2">

<?php
function getvalue($row){
	global $cfg;
	$data = $cfg['lang'] == 'cn' ? $row['data'] : $row['endata'];
	// 1:文本框 2：单选 3：下拉列表 4：邮件地址 5：日期类型 6：多行文本框
	$value = "";
	switch ($row['type']){
		case 1:
		case 4:
		case 5:
			$value = "<input name=\"v_{$row['did']}\" type=\"text\" />";
			break;
		case 2:
			$arr_d = split("\n", $data);
			$data_0 = trim($arr_d[0]);
			$data_1 = isset($arr_d[1]) ? trim($arr_d[1]) : "";
			$value = "{$data_0}<input name=\"v_{$row['did']}\" seq=1 type=\"radio\" value=\"{$data_0}\">{$data_1}<input name=\"v_{$row['did']}\" type=\"radio\" seq=2 value=\"{$data_1}\">";
			break;
		case 3:
			$arr_d = split("\n", $data);
			$value = "<select name=\"v_{$row['did']}\">";
			foreach ($arr_d as $v){
				$v = trim($v);
				$value .= "<option value=\"{$v}\">{$v}</option>";
			}
    		$value .= '</select>';
			break;
		case 6:
			$value = "<textarea name=\"v_{$row['did']}\" class=\"note\"></textarea>";
			break;
	}
	
	return $value;
}
?>
<?php
foreach ($this->dictinfopre as $index => $maxrow){
	if (count($maxrow) == 1){// 单行模式
		$row = $maxrow[0];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");

		echo "<tr><td align=\"right\">{$name}：</td>";
		echo "<td colspan=\"7\">{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		echo "</tr>";
	}else{
		echo '<tr>';
		
		$row = $maxrow[0];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		
		$row = $maxrow[1];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";

		if (isset($maxrow[2])){
		$row = $maxrow[2];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		}else{
			echo '<td align="right">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
		}
		
		echo '</tr>';
	}
}
?>
</table>
<table class="t1" id="_dictinfoafter" style="display:none">
<?php
foreach ($this->dictinfoafter as $index => $maxrow){
	if (count($maxrow) == 1){// 单行模式
		$row = $maxrow[0];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");

		echo "<tr><td align=\"right\">{$name}：</td>";
		echo "<td colspan=\"7\">{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		echo "</tr>";
	}else{
		echo '<tr>';
		
		$row = $maxrow[0];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		
		$row = $maxrow[1];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";

		if (isset($maxrow[2])){
		$row = $maxrow[2];
		$name = $cfg['lang'] == 'cn' ? $row['key'] : $row['enkey'];
		$value = getvalue($row);
		$tip = '';
		if ($row['ismust'])
			$tip = _T("必填");
		echo "<td align=\"right\">{$name}：</td>";
		echo "<td>{$value}</td>";
		echo "<td><span class=\"tip\" id=\"tip_{$row['did']}\">{$tip}</span></td>";
		}else{
			echo '<td align="right">&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td>';
		}
		
		echo '</tr>';
	}
}
?>
  </table>
  <a class="sub" href="#submit" onclick="javascript:return doSubmit();"><?php echo _T("提交");?></a>
</div>
</div>
</div>
</body>
</html>
<script>
<?php
if ($this->isreg){
	echo 'alert("' . _T("邮箱已注册") . '");';
}?>
</script>